#include "ImgurUploaderCOM-impl.h"
#include "imgUrUploader.h"

NS_IMPL_ISUPPORTS1(CImgurUploader, IImgurUploaderCOM)

/* construktor */
CImgurUploader::CImgurUploader()
{
}

/* destructor */
CImgurUploader::~CImgurUploader()
{
}

/* upload method */
NS_IMETHODIMP CImgurUploader::UploadImage(PRInt32 iUploadMethod,
                                          const char *sSrcImgURL,
                                          nsACString & sImgURL,
                                          nsACString & sImgDelURL,
                                          PRInt32 *_retval)
{
 char imgURI[1024], imgDelURI[1024];
 
 *_retval = imgurPostImage(iUploadMethod, sSrcImgURL, imgURI, imgDelURI);

 sImgURL.Assign(imgURI, strlen(imgURI));
 sImgDelURL.Assign(imgDelURI, strlen(imgDelURI));
 return NS_OK;
}